<?php
/** @var string $type */
/** @var string $url */
/** @var array $typeList */

use yii\helpers\Html;

$this->title = '上传临时素材';
$this->params['breadcrumbs'][] = ['label' => '素材', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<?= Html::beginForm('', 'post', ['enctype' => 'multipart/form-data']) ?>
<h2>CUrl上传</h2>
<div class="form-group">
    <?= Html::dropDownList('type', $type, $typeList, ['class' => 'form-control']) ?>
</div>
<div class="form-group">
    <?= Html::fileInput('media') ?>
</div>
<div class="form-group">
    <button class="btn btn-primary">上传</button>
</div>
<?= Html::endForm() ?>
<?= Html::beginForm($url, 'post', ['enctype' => 'multipart/form-data']) ?>
<h2>表单上传</h2>
<div class="form-group">
    <?= Html::dropDownList('type', $type, $typeList, ['class' => 'form-control']) ?>
</div>
<div class="form-group">
    <?= Html::fileInput('media') ?>
</div>
<div class="form-group">
    <button class="btn btn-primary">上传</button>
</div>
<?= Html::endForm() ?>
